#include <stdlib.h>

#include "tdp2.hpp"
#include "tdp2_allocator.hpp"



namespace TDP
{
	static void *defaultRealloc(void *opaque, void *ptr, LargeInt sz, LargeInt align)
	{
		return _aligned_realloc(ptr, static_cast<size_t>(sz), static_cast<size_t>(align));
	}

	static RDX::ObjectManagement::Allocator defaultAllocator =
	{
		NULL,
		defaultRealloc,
	};

	const RDX::ObjectManagement::Allocator &Memory::DefaultAllocator()
	{
		return defaultAllocator;
	}
};
